Skip to content

Feat advertiser modes#135

Merged
JacksonTheMaster merged 7 commits into
nightlyfrom
feat-advertiser-modes
Oct 28, 2025
Merged

Feat advertiser modes#135
JacksonTheMaster merged 7 commits into
nightlyfrom
feat-advertiser-modes

Conversation

@akirilov

Copy link
Copy Markdown
Contributor

New Features:

  • Advertiser now has "auto" and DNS modes depending on the value of OverrideAdvertisedIp:
    • If the value is "auto", the advertiser uses ipify to determine your public IP
    • If the value is a valid ipv4 address, it is used as-is
    • Otherwise, the advertiser attempts a DNS lookup on the provided string

@akirilov akirilov requested review from JacksonTheMaster and Copilot and removed request for Copilot October 27, 2025 11:59
@akirilov akirilov closed this Oct 27, 2025
@akirilov akirilov reopened this Oct 27, 2025
@akirilov akirilov changed the base branch from main to nightly October 27, 2025 12:01
Copilot AI review requested due to automatic review settings October 27, 2025 13:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the advertiser configuration to support multiple IP resolution modes. The OverrideAdvertisedIp setting has been renamed to AdvertiserOverride to better reflect its enhanced functionality, which now includes auto-detection via ipify, direct IPv4 usage, and DNS resolution.

Key changes:

  • Renamed all references from OverrideAdvertisedIp to AdvertiserOverride throughout the codebase
  • Added IP resolution logic supporting "auto" mode (ipify), direct IPv4, and DNS lookup
  • Updated command-line flag from -OverrideAdvertisedIp to -AdvertiserOverride

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/advertiser/advertiser.go Added getIpFromAdvertiserOverride function to handle IP resolution logic for auto/DNS/IPv4 modes
src/config/vars.go Renamed configuration variable from OverrideAdvertisedIp to AdvertiserOverride
src/config/getters.go Updated getter function name to GetAdvertiserOverride
src/config/setters.go Updated setter function name to SetAdvertiserOverride
src/config/config.go Updated JSON field name and environment variable to match new naming
src/core/loader/cmdargs.go Renamed command-line flag from OverrideAdvertisedIp to AdvertiserOverride
src/core/loader/loader.go Updated function call to use new getter name

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/advertiser/advertiser.go Outdated
akirilov and others added 2 commits October 27, 2025 22:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@akirilov akirilov requested a review from Copilot October 27, 2025 14:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/advertiser/advertiser.go
Comment thread src/core/loader/cmdargs.go Outdated
Comment thread src/advertiser/advertiser.go Outdated
@akirilov

Copy link
Copy Markdown
Contributor Author

@JacksonTheMaster ready for a review

@JacksonTheMaster JacksonTheMaster left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@JacksonTheMaster JacksonTheMaster merged commit adc0f51 into nightly Oct 28, 2025
1 check passed
@JacksonTheMaster JacksonTheMaster deleted the feat-advertiser-modes branch October 28, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants